{% extends "base.html" %}
{% load static %}
{% block title %}更新{% endblock %}
{% block css %}<link rel="stylesheet" href="{% static 'css/update_teleplay.css' %}">{% endblock %}
{% block content %}

<div class="update-form">
    <div class="status">{{ status | default_if_none:"" }}</div>
    <h3>{{ user_data.name }}</h3>
    <form method="post" class="update-f">
        {% csrf_token %}
        <div class="update-info">
            <span class="update-key">主题</span>
            <input class="update-value" type="text" name="theme" value={{ user_data.theme }}> 
        </div>
        <div class="update-info">
            <span class="update-key">标题</span>
            <input class="update-value" type="text" name="title" value={{ user_data.title }}> 
        </div>
        <div class="update-info">
            <span class="update-key">季数</span>
            <input class="update-value" type="text" name="season" value={{ user_data.season | default_if_none:"" }}> 
        </div>
        <div class="update-info">
            <span class="update-key">副标题</span>
            <input class="update-value" type="text" name="subtitle" value={{ user_data.subtitle | default_if_none:"" }}> 
        </div>
        <div class="update-info">
            <span class="update-key">集数</span>
            <input class="update-value" type="text" id="episodes" name="episodes" value={{ user_data.episodes | default_if_none:"" }}> 
        </div>
        <div class="update-info">
            <span class="update-key">时长</span>
            <input class="update-value" type="text" id="duration" placeholder="以min为单位" name="duration" value={{ user_data.duration | default_if_none:"" }}> 
        </div>
        <div class="update-info">
            <span class="update-key">开播日期</span>
            <input class="update-value" type="text" id="date_start" name="date_start" 
            value={{ user_data.date_start | default_if_none:"" | date:"Y-m-d" }}> 
        </div>
        <div class="update-info">
            <span class="update-key">完播日期</span>
            <input class="update-value" type="text" id="date_end" name="date_end" 
            value={{ user_data.date_end | default_if_none:"" | date:"Y-m-d" }}> 
        </div>
        <div class="update-info">
            <span class="update-key">制作公司</span>
            <input class="update-value" type="text" name="producer" value='{{ user_data.producer | default_if_none:"" }}'> 
        </div>
        <div class="update-info">
            <span class="update-key">导演</span>
            <input class="update-value" type="text" name="director" value='{{ user_data.director | default_if_none:"" }}'> 
        </div>
        

        <input type="submit" value="提交">
</div>

<script>

</script>
    
{% endblock %}